<?php

use Illuminate\Validation\Rule;

$uniqueNick = Rule::unique('users', 'u_name')
    ->where(function ($query) {
        $query->where([
            'u_name' => Request()->name,
        ]);
    });

return [
    'adminRegister' => [
        [
            'name' => ['required', $uniqueNick ],
            'password' => ['required', 'min:6'],
        ]
    ],
    'adminLogin' => [
        [
            'name' => ['required', 'string' ],
            'password' => ['required', 'min:6'],
        ]
    ],
];